

const state = {
    // TOP300 歌单
    top300SongListData: [],
    top300SongListPageTotal: 0,
    top300SongListQuery: {

    },
    // TOP10000 歌曲
    tempData: [],
    top10000SongsData: [],
    top10000SongsPageTotal: 0,
    top10000SongsQuery: {
        pageIndex: 0,
        pageSize: 10
    },
    songListStatisticsData: {}
}

const mutations = {
    // TOP300 歌单
    SET_TOP300_SONG_LIST_DATA: (state, top300SongListData) => {
        state.top300SongListData = top300SongListData
    },
    SET_TOP300_SONG_LIST_PAGETOTAL: (state, top300SongListPageTotal) => {
        state.top300SongListPageTotal = top300SongListPageTotal
    },
    SET_TOP300_SONG_LIST_QUERY: (state, top300SongListQuery) => {
        state.top300SongListQuery = top300SongListQuery
    },
    // TOP10000 歌曲
    SET_TEMP_DATA: (state, tempData) => {
        state.tempData = tempData
    },
    SET_TOP10000_SONGS_DATA: (state, top10000SongsData) => {
        state.top10000SongsData = top10000SongsData
    },
    SET_TOP10000_SONGS_PAGETOTAL: (state, top10000SongsPageTotal) => {
        state.top10000SongsPageTotal = top10000SongsPageTotal
    },
    SET_TOP10000_SONGS_QUERY: (state, top10000SongsQuery) => {
        state.top10000SongsQuery = top10000SongsQuery
    },
    SET_SONG_LIST_STATISTICS_DATA: (state, songListStatisticsData) => {
        state.songListStatisticsData = songListStatisticsData

    }

}


// ajax异步请求要么放在组件发 要么 放在actions发
// 这里是放在组件发
const actions = {
    setTop300SongListData({ commit }, data) {

    },
    setTop10000SongsData({ commit }, data) {

    }
    // ...
}

export default {
    state,
    mutations,
    actions
}